import Home from '@/views/home.vue'
import Main from '@/views/main.vue'
import List from '@/views/list.vue'
import News from '@/views/news.vue'
import Profile from '@/views/profile.vue'

import Detail from '@/views/detail.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'
import Rent from '@/views/rent.vue'
import RentSearch from '@/views/rentSearch.vue'

import CityList from '@/views/cityList.vue'
import Collect from '@/views/collect.vue'
import Gorent from '@/views/gorent.vue'
import Map from '@/views/map.vue'
const routes = [
  {
    path: '/',
    component: Home,
    redirect: '/main',
    children: [
      {
        path: 'main',
        component: Main
      },
      {
        path: 'list',
        component: List
      },
      {
        path: 'news',
        component: News
      },
      {
        path: 'profile',
        component: Profile
      }
    ]
  },
  {
    name: 'detail',
    // path: '/detail/:id',
    path: '/detail/:id',
    component: Detail
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/register',
    component: Register
  },
  {
    path: '/rent',
    component: Rent
  },
  {
    path: '/search',
    component: RentSearch
  },
  {
    path: '/city',
    component: CityList
  },
  {
    path: '/collect',
    component: Collect
  },
  {
    path: '/gorent',
    component: Gorent
  },
  {
    path: '/map',
    component: Map
  }
]
export default routes
